1. Field of the Invention
The present invention relates to a method of and an apparatus for picking up an image of the surface of an object such as a medical capsule to inspect the surface, and particularly, to a technique of accurately inspecting the surface of an object colored with different colors and brightness.
2. Description of the Related Art
Stains, flaws, printing defects, etc., on the surface of a small object such as a medical capsule have usually been inspected by human eyes. Cameras are recently used for such inspection, to improve inspection efficiency and accuracy and to automate the inspection.
Each medical capsule generally comprises two parts colored with different colors and brightness.
To inspect the surface conditions of such capsule, one prior art employs a single camera, which picks up an image of the capsule surface and photoelectrically converts the picked up image into an electrical signal. According to this signal, the prior art checks the surface conditions of the capsule.
During the inspection, high-and low-brightness parts of the capsule provide different base signal levels. If the inspection is carried out based on the same reference level, the difference of signal level may increase the occurrence of errors, to deteriorate inspection accuracy. Accordingly, the prior art employs an amplifier for amplifying the level of a signal from the low-brightness part of the capsule up to the level of a signal from the high-brightness part thereof before carrying out the inspection.
When the signal level of the low-brightness part is amplified, however, noise is also amplified to erroneously indicate that there are stains and flaws.
A CCD image sensor is frequently used as an image pick-up element. When the light quantity of an image formed on the CCD image sensor is too small, noise due to dark current fluctuations and a large amplification factor of an amplifier will greatly influence a result of inspection. On the other hand, when the light quantity of an image formed on the image pick-up element is excessively large, striation noise due to fluctuations in a charge saturation quantity drastically influence a result of inspection.
It is necessary, therefore, to properly set the quantity of light received by the image pick-up element, to improve inspection accuracy and suppress noise. According to the prior art, however, it is very difficult to properly set the quantity of light received by the image pick-up element because the surface of an inspection object colored with different colors and brightness causes a great difference in quantity of light in an image formed on the image pick-up element. This is why the prior art achieves poor inspection accuracy.
An object of the invention is to provide an image signal that causes no erroneous determination due to noise amplification.
Another object of the invention is to enable inspection of the surface of an object by using an image signal that causes no erroneous determination, to thereby improve inspection accuracy.
Still another object of the invention is to pick up an image of the surface of any colored object after equalizing the quantities of light provided by high-and low-brightness parts of the object.
Still another object of the invention is to determine a positional relation between high-and low-brightness parts of the surface of an object, to correctly inspect the surface conditions of the object even if the positional relation is inverted.
Still another object of the invention is to enable inspection of the surface of a monochrome object in the same manner as the surface of a differently colored object.